<template>
<div class="line">
<el-container>
  
  <el-container>
    <el-header><el-menu
  :default-active="activeIndex2"
  class="el-menu-demo"
  mode="horizontal"
  @select="handleSelect"
  background-color="black"
  text-color="#fff"
  active-text-color="#ffd04b">
  <el-menu-item index="1"><a href="#" target="_self">首页</a></el-menu-item>
  <el-submenu index="2">
    <template slot="title">笔记本</template>
    <el-menu-item index="2-1">雷蛇笔记本</el-menu-item>
    <el-menu-item index="2-2">雷神笔记本</el-menu-item>
    <el-menu-item index="2-3">外星人笔记本</el-menu-item>
  </el-submenu>
  
   <el-submenu index="6">
    <template slot="title">更多配件</template>
    <el-menu-item index="6-1">鼠标</el-menu-item>
    <el-menu-item index="6-2">键盘</el-menu-item>
    <el-menu-item index="6-3">耳机</el-menu-item>
  </el-submenu>
  <el-menu-item index="8"><a href="#" target="_blank">售后网点</a></el-menu-item>
  <el-menu-item index="3"><a href="#" target="_blank">订单管理</a></el-menu-item>
</el-menu>  
</el-header>


 </el-container>
</el-container>
</div>
</template>
<style>
  .el-header, .el-footer {
    background-color: black;
    color: #333;
    text-align: center;
    line-height: 60px;
  }
  
  .el-aside {
    background-color: #D3DCE6;
    color: #333;
    text-align: center;
    line-height: 200px;
  }
  
  .el-main {
    background-color: black;
    color: #333;
    text-align: center;
    line-height: 160px;
  }
  
  body > .el-container {
    margin-bottom: 40px;
  }

</style>



<script>
  export default {
    data() {
      return {
        activeIndex: '1',
        activeIndex2: '1'
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      }
    }
  }
</script>

